import reshandler from 'services/response-handler'

function makeQueryRepairAppointmentData(response) {
  return Object.assign({}, response, {
    repairAppointment: response.repairAppointment || {}
  })
}

export default function (params, success, fail) {
  // request 
  params = Object.assign({}, params, {
    methodName: "QueryRepairAppointment"
  })

  // invoke
  this.$.get(params).then(reshandler.success(success, fail, makeQueryRepairAppointmentData), reshandler.error(fail))
}